<template>
<div class="tables">
  <el-table
   :data="tableData" 
    style="width: 100%;" 
    border 
     @row-click="handleCurrentChange"
     :highlight-current-row ="true"    
     max-height="250">
    <el-table-column v-for="column in columns" :prop="column.prop" :label="column.label" :key="column.index" width="auto" header-row-style="background-color:#000;">
  </el-table-column>
    </el-table>
</div>
 
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      default: null
    },
    columns: {
      type: Array,
      default: null
    },
    handleCurrentChange: {
      type: Function,
      default: null
    }
  },
  data() {
    return {
      // tableData: [''],
      currentRow: "",
      show: false,
      date: "",
      srcSetType: "",
      name: ""
    };
  },
  created() {
    // this.tableDatas=props.tableData;
  },
  methods: {
    // handleCurrentChange(val) {
    //   this.currentRow = val;
    //   ;
    //   this.id = val.id;
    //   this.name = val.name;
    //   this.srcSetType = val.srcSetType;
    //   this.show = true;
    //   console.log(val);
    // }
  }
};
</script>

<style>
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/  
 .tables ::-webkit-scrollbar  
 {  
  width: 0px;  
  height: 0px;  
  background-color: #F5F5F5;  
 }  
  
/*定义滚动条轨道 内阴影+圆角*/  
.tables ::-webkit-scrollbar-track  
 {  
  -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);  
  border-radius: 10px;  
  background-color: #F5F5F5;  
 }  
</style>
